<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let set = new Set([20, 20, 20, 20, 30, 5, 80, 6])
        console.log(set);
        // set转成数组类型
        let arr = [...set]
        console.log(arr)

        // 简写形式
        let newArr = [...new Set([10, 20, 20, 20, 20, 50, 60, 70, 80, 90])]
        console.log(newArr)
    </script>
</body>

</html>